package com.ruoyi.financial.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.financial.mapper.FCustOrderMapper;
import com.ruoyi.financial.domain.FCustOrder;
import com.ruoyi.financial.service.IFCustOrderService;

/**
 * 客户押单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-07
 */
@Service
public class FCustOrderServiceImpl implements IFCustOrderService 
{
    @Autowired
    private FCustOrderMapper fCustOrderMapper;

    /**
     * 查询客户押单
     * 
     * @param id 客户押单主键
     * @return 客户押单
     */
    @Override
    public FCustOrder selectFCustOrderById(Long id)
    {
        return fCustOrderMapper.selectFCustOrderById(id);
    }

    /**
     * 查询客户押单列表
     * 
     * @param fCustOrder 客户押单
     * @return 客户押单
     */
    @Override
    public List<FCustOrder> selectFCustOrderList(FCustOrder fCustOrder)
    {
        return fCustOrderMapper.selectFCustOrderList(fCustOrder);
    }

    /**
     * 新增客户押单
     * 
     * @param fCustOrder 客户押单
     * @return 结果
     */
    @Override
    public int insertFCustOrder(FCustOrder fCustOrder)
    {
        fCustOrder.setCreateTime(DateUtils.getNowDate());
        return fCustOrderMapper.insertFCustOrder(fCustOrder);
    }

    /**
     * 修改客户押单
     * 
     * @param fCustOrder 客户押单
     * @return 结果
     */
    @Override
    public int updateFCustOrder(FCustOrder fCustOrder)
    {
        fCustOrder.setUpdateTime(DateUtils.getNowDate());
        return fCustOrderMapper.updateFCustOrder(fCustOrder);
    }

    /**
     * 批量删除客户押单
     * 
     * @param ids 需要删除的客户押单主键
     * @return 结果
     */
    @Override
    public int deleteFCustOrderByIds(Long[] ids)
    {
        return fCustOrderMapper.deleteFCustOrderByIds(ids);
    }

    /**
     * 删除客户押单信息
     * 
     * @param id 客户押单主键
     * @return 结果
     */
    @Override
    public int deleteFCustOrderById(Long id)
    {
        return fCustOrderMapper.deleteFCustOrderById(id);
    }
}
